#ifndef _DEF_H_
#define _DEF_H_

#include "stm32f0xx.h"

typedef u8   	U8;   /*unsigned 8 bit definition */
typedef u16		U16;   /*unsigned 16 bit definition*/
typedef u32   	U32;   /*unsigned 32 bit definition*/
typedef signed char     	S8;   /*signed 8 bit definition */
typedef short signed int	S16;   /*signed 16 bit definition*/
typedef long int    	 	S32;   /*signed 32 bit definition*/

typedef u8		uint8;   /*unsigned 8 bit definition */
typedef u16		uint16;   /*unsigned 16 bit definition*/
typedef u32		uint32;   /*unsigned 32 bit definition*/
//typedef signed char			s8;   /*signed 8 bit definition */
//typedef signed short int		s16;   /*signed 16 bit definition*/
//typedef signed long int		s32;   /*signed 32 bit definition*/

typedef u8   	tU08;   /*unsigned 8 bit definition */
typedef unsigned short int	tU16;   /*unsigned 16 bit definition*/
typedef unsigned long		tU32;   /*unsigned 32 bit definition*/
typedef signed char			tS08;   /*signed 8 bit definition */
typedef short signed int	tS16;   /*signed 16 bit definition*/
typedef signed long int		tS32;   /*signed 32 bit definition*/

typedef unsigned char  BYTE;
typedef unsigned int   UINT;
typedef unsigned short WORD;
typedef unsigned short UINT16;
typedef unsigned long  UINT32;
typedef unsigned long  DWORD;
typedef unsigned long  ULONG;

typedef float FLOAT;
typedef double DOUBLE;

/* Boolean type */
// typedef enum { FALSE = 0, TRUE } BOOL;
#include <stdbool.h>
typedef bool BOOL;
#ifndef FALSE
#define FALSE false
#define TRUE true
#endif

typedef int   INT;
typedef float FLOAT;

typedef U8	 uint8_t;
typedef U16  uint16_t;
typedef U32  uint32_t;
typedef S8	 int8_t;
typedef S16  int16_t;
//typedef S32  int32_t;    ;

#define STRUCT_OFFSET(stru_name, element) (unsigned long)&((struct stru_name*)0)->element



#endif

